import { Document } from 'mongoose'
import { Request } from 'express'

export interface IUser extends Document {
  _id: string
  username: string
  email: string
  password: string
  createdAt: Date
  updatedAt: Date
}

export interface INote extends Document {
  _id: string
  userId: string
  title: string
  content: string
  tags?: string[]
  isPublic: boolean
  createdAt: Date
  updatedAt: Date
}

export interface AuthRequest extends Request {
  user?: {
    id: string
    email: string
    username: string
  }
}

export interface LoginResponse {
  token: string
  user: {
    id: string
    username: string
    email: string
  }
}

export interface RegisterData {
  username: string
  email: string
  password: string
}

export interface LoginData {
  email: string
  password: string
}